package com.bfly.mall.order.enums;

/**
 * 物流状态
 *
 * @author 长沙商脉科技有限公司
 * @date 2020/4/17 21:35
 */
public enum ExpressStatusEnum {
    INITIAL(200, "初始状态"),
    WAIT_SHIP(201, "待发货"),
    SHIPPING(202, "已发货"),
    RECEIVED(203, "已收货"),

    RETURN_WAIT_RECEIVE(204, "商家待收货"),
    RETURN_RECEIVED(205, "商家已收货");


    private int id;
    private String name;

    ExpressStatusEnum(int id, String name) {
        this.id = id;
        this.name = name;
    }

    public static ExpressStatusEnum getStatus(int id) {
        for (ExpressStatusEnum status : ExpressStatusEnum.values()) {
            if (id == status.getId()) {
                return status;
            }
        }
        return null;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
